<?xml version="1.0" encoding="UTF-8" standalone="no"?><HBRRepo><variables/><rulesets/><rules/><components><component id="4" name="Forecast_Only_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Forecast_Only_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[elseif("OFS_Trend"->"BegBalance"==10)
				if(@isuda("Account","calcRound"))
                	IF(@ISMBR(&OEP_CurYr))
						"OFS_Calculated" = @Round(@prior("Actual"->"OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
                    ELSE
                    	"OFS_Calculated" = @Round(@prior("OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
                    ENDIF    
				else
                	IF(@ISMBR(&OEP_CurYr))
						"OFS_Calculated" = @prior("Actual"->"OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
                    ELSE
                    	"OFS_Calculated" = @prior("OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
                    ENDIF    
				endif
elseif("OFS_Trend"->"BegBalance"==3)
			if(@sumrange("OEP_Plan"->"OFS_Total Plan",&OEP_StartMnth:&OEP_EndMnth)-@sumrange("OEP_Actual"->"OFS_Load",&OEP_StartMnth:&OEP_CurMnth)>0)
				if(@ISACCTYPE(LAST))
					if(@isuda("Account","Calcround"))
						"OFS_Calculated"=@round("OEP_Plan"->"OFS_Total Plan");
					else
						"OFS_Calculated" ="OEP_Plan"->"OFS_Total Plan";
					endif
				else
					if(@isuda("Account","Calcround"))
						"OFS_Calculated"=@round(((@sumrange("OEP_Plan"->"OFS_Total Plan",&OEP_StartMnth:&OEP_EndMnth))-(@sumrange("OEP_Actual"->"OFS_Load",&OEP_StartMnth:&OEP_CurMnth)))/@count(skipnone,&OEP_FcstMnth:&OEP_EndMnth));
					else
						"OFS_Calculated"=((@sumrange("OEP_Plan"->"OFS_Total Plan",&OEP_StartMnth:&OEP_EndMnth))-(@sumrange("OEP_Actual"->"OFS_Load",&OEP_StartMnth:&OEP_CurMnth)))/@count(skipnone,&OEP_FcstMnth:&OEP_EndMnth);
					endif
				endif
			else
				"OFS_Calculated"=#missing;
			endif
    @calcmode(cell);
		elseif("OFS_Trend"->"BegBalance"==35)			
			if(@ismbr(&OEP_FCSTStartYr))
				if(@ismbr(&OEP_FcstMnth))
					if(@ismbr(@MBRCOMPARE("==", &OEP_FcstMnth, &OEP_StartMnth)))
						if(@isuda("Account","calcRound"))
							OFS_Calculated=@round((@prior("OFS_Load"->OEP_Actual->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
							(@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0) )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						else
							OFS_Calculated=((@prior("OFS_Load"->OEP_Actual->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
  							(@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0) )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						endif
					else
						if(@isuda("Account","calcRound"))
							OFS_Calculated=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
							(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						else
							OFS_Calculated=((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
							(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						endif
					endif
				else
					if(@isuda("Account","calcRound"))
						OFS_Calculated=@round((@prior("OFS_Calculated")*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					else
						OFS_Calculated=((@prior("OFS_Calculated")*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					endif
				endif
			elseif(@ismbr(@RSIBLINGS(&OEP_FCSTStartYr)))
				if(@ismbr(&OEP_StartMnth))
					if(@isuda("Account","calcRound"))
						OFS_Calculated=@round((@prior("OFS_Calculated"->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
						(@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0))))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					else
						OFS_Calculated=((@prior("OFS_Calculated"->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0))))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					endif
				else
					if(@isuda("Account","calcRound"))
						OFS_Calculated=@round((@prior("OFS_Calculated")*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
						(@MDSHIFT( "OFS_Calculated", -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					else
						OFS_Calculated=((@prior("OFS_Calculated")*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@MDSHIFT( "OFS_Calculated", -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					endif
				endif
			endif
	@calcmode(block);
		elseif("OFS_Trend"->"BegBalance"==36)			
			if(@isuda("Account","calcRound"))					
		if(@ismbr(&OEP_FcstMnth) and @ismbr(&OEP_FcstStartYr))	
			"OFS_Calculated"=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
		elseif(@ismbr(&OEP_StartMnth) and @ismbr(@RSIBLINGS(&OEP_FCSTStartYr)))
       		"OFS_Calculated"=@round((@Prior("OFS_Total Plan"->&OEP_EndMnth,1,@LEVMBRS ("Years", 0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
				else			
			"OFS_Calculated" =@round((@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
				endif	
			else		
		if(@ismbr(&OEP_FcstMnth) and @ismbr(&OEP_FcstStartYr))	
			"OFS_Calculated"=@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
		elseif(@ismbr(&OEP_StartMnth) and @ismbr(@RSIBLINGS(&OEP_FCSTStartYr)))
        	"OFS_Calculated"=@Prior("OFS_Total Plan"->&OEP_EndMnth,1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
				else
			"OFS_Calculated" =(@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
				endif	
			endif]]></script></component><component id="3" name="Monthly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Monthly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[If("OFS_Trend"->"BegBalance"==1)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated = @Round(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated =@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==2)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated =@Round(("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated = ("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
						
elseif("OFS_Trend"->"BegBalance"==4)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated = @Round(@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated = @avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==5)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated = @Round(("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated = ("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->BegBalance==12)						
	OFS_Calculated =#missing;					
elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)										
	OFS_Calculated=0;
    OFS_Calculated=#missing;					
					
]]></script></component><component id="5" name="Qrtly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Qrtly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[If("OFS_Trend"->"BegBalance"==1)										
		if(@isuda("Account","CalcRound"))	
        	if(@isuda("Account","Flow"))
				"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*"PeriodsInQtr"*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
            else
            	"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
            endif
		else
        	if(@isuda("Account","Flow"))
				OFS_Calculated =(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*"PeriodsInQtr"*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
            else
            	OFS_Calculated =(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");		
            endif
		endif									
elseif("OFS_Trend"->"BegBalance"==2)										
		if(@isuda("Account","CalcRound"))
        	if(@isuda("Account","Flow"))
				OFS_Calculated =@Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));	
            else
            	OFS_Calculated =@Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));	
            endif
		else	
        	if(@isuda("Account","Flow"))
				OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");	
            else
            	OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");	
            endif
		endif									
	elseif("OFS_Trend"->"BegBalance"==4)										
		if(@isuda("Account","CalcRound"))		
        	if(@isuda("Account","Flow"))
				OFS_Calculated = @Round((@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));		
            else
           		OFS_Calculated = @Round((@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));	
            endif
		else	
        	if(@isuda("Account","Flow"))
				OFS_Calculated = (@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");	
            else
            	OFS_Calculated = (@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
            endif
		endif												
	elseif("OFS_Trend"->"BegBalance"==10)										
		if(@prior("OEP_Qrtly Plan",1,@levmbrs("Years",0))<>#Missing)									
			if(@isuda("Account","CalcRound"))								
				@Round(@Prior("OFS_Total Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));							
			else								
				@Prior("OFS_Total Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");							
			endif								
		else									
			if(@isuda("Account","CalcRound"))								
				if(@ismbr("Qtrly 1"))							
					@Round(@Prior("OFS_Total Plan"->"Q1",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				elseif(@ismbr("Qtrly 2"))							
					@Round(@Prior("OFS_Total Plan"->"Q2",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				elseif(@ismbr("Qtrly 3"))							
					@Round(@Prior("OFS_Total Plan"->"Q3",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				elseif(@ismbr("Qtrly 4"))							
					@Round(@Prior("OFS_Total Plan"->"Q4",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				endif							
			else								
				if(@ismbr("Qtrly 1"))							
					@Prior("OFS_Total Plan"->"Q1",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				elseif(@ismbr("Qtrly 2"))							
					@Prior("OFS_Total Plan"->"Q2",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				elseif(@ismbr("Qtrly 3"))							
					@Prior("OFS_Total Plan"->"Q3",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				elseif(@ismbr("Qtrly 4"))							
					@Prior("OFS_Total Plan"->"Q4",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				endif							
			endif								
											
		endif									
	elseif("OFS_Trend"->BegBalance==12)										
				OFS_Calculated=#missing;							
	elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)																
				OFS_Calculated=0;
                OFS_Calculated=#missing;							
	endif										

]]></script></component><component id="2" name="Weekly_ForecastOnly" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Weekly_ForecastOnly</property><property name="seeded">true</property><script type="calcscript"><![CDATA[elseif("OFS_Trend"->"BegBalance"==3)						
	if(("OEP_Plan"->"OFS_Total Plan"->"OEP_Weekly Plan")-@sumrange("OEP_Actual"->"OFS_Load",OEP_W1:&OEP_CurWeek)>0)							
          if(@ISACCTYPE(LAST))				
              if(@isuda("Account","Calcround"))			
                  "OFS_Calculated"=@round("OEP_Plan"->"OFS_Total Plan");		
              else			
                  "OFS_Calculated" ="OEP_Plan"->"OFS_Total Plan";		
              endif			
          else				
              	if(@isuda("Account","Calcround"))		
				"OFS_Calculated"=@round((("OEP_Plan"->"OFS_Total Plan"->"OEP_Weekly Plan")-@sumrange("OEP_Actual"->"OFS_Load",OEP_W1:&OEP_CurWeek))/("TP-Weeks"-@count(skipnone,@range("OFS_Load",OEP_W1:&OEP_CurWeek))));				
                  else
				"OFS_Calculated"=((("OEP_Plan"->"OFS_Total Plan"->"OEP_Weekly Plan")-@sumrange("OEP_Actual"->"OFS_Load",OEP_W1:&OEP_CurWeek))/("TP-Weeks"-@count(skipnone,@range("OFS_Direct Input",OEP_W1:&OEP_CurWeek))));				
              endif			
          endif				
      else					
          "OFS_Calculated"=#missing;				
      endif	
elseif("OFS_Trend"->"BegBalance"==35)			
  	if(@isuda("Account","calcRound"))		  			
  		if(@ismbr(&OEP_FcstMnth))	
			"OFS_Calculated"=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));					
  		else
			"OFS_Calculated" =@round((@prior("OFS_Calculated")*					
  			(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));					
  		endif	
  	else		
  		if(@ismbr(&OEP_FcstMnth))	
			"OFS_Calculated"=((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));					
  	 	else	 			
			"OFS_Calculated" =((@prior("OFS_Calculated")*					
  			(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));  					
  		endif	
  	endif	
elseif("OFS_Trend"->"BegBalance"==36)			
	if(@isuda("Account","calcRound"))					
		if(Not(@ismbr(OEP_W1:&OEP_CurWeek) and @ismbr(&OEP_CurYr)))	
			"OFS_Calculated"=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
		elseif(@ismbr(OEP_W1) and @ismbr(@RSIBLINGS(&OEP_CurYr)))
       		"OFS_Calculated"=@round((@Prior("OFS_Total Plan"->OEP_W52,1,@LEVMBRS ("Years", 0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
        else			
			"OFS_Calculated" =@round((@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
		endif	
	else		
		if(Not(@ismbr(OEP_W1:&OEP_CurWeek) and @ismbr(&OEP_CurYr)))	
			"OFS_Calculated"=@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
		elseif(@ismbr(OEP_W1) and @ismbr(@RSIBLINGS(&OEP_CurYr)))
        	"OFS_Calculated"=@Prior("OFS_Total Plan"->OEP_W52,1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
        else
			"OFS_Calculated" =(@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
		endif	
	endif           ]]></script></component><component id="1" name="Weekly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Weekly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[If("OFS_Trend"->"BegBalance"==1)						
	if(@isuda("Account","CalcRound"))					
		"OFS_Calculated"=@Round(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , OEP_W1:&OEP_CurWeek)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		"OFS_Calculated"=@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , OEP_W1:&OEP_CurWeek)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==2)						
	if(@isuda("Account","CalcRound"))					
		"OFS_Calculated"=@Round(("OEP_Actual"->&OEP_CurWeek->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		"OFS_Calculated"=("OEP_Actual"->&OEP_CurWeek->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==4)
	if("TP-Weeks"->&OEP_PriorYr==52)        
		if(@isuda("Account","CalcRound"))	 		  
			"OFS_Calculated"= @Round(@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,OEP_W1:OEP_W52)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			"OFS_Calculated"= @avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,OEP_W1:OEP_W52)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif
	else       
		if(@isuda("Account","CalcRound"))	 		  
			"OFS_Calculated"= @Round(@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("OEP_Weekly Plan",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			"OFS_Calculated"= @avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("OEP_Weekly Plan",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif
	endif
elseif("OFS_Trend"->"BegBalance"==5)						
	if(@isuda("Account","CalcRound"))					
		"OFS_Calculated"= @Round(("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		"OFS_Calculated"= ("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->BegBalance==12)						
	"OFS_Calculated"=#missing;					
elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)										
	OFS_Calculated=0;
    OFS_Calculated=#missing;					]]></script></component></components><templates><template custom="yes" id="1" name="OFS_PrepareRollingForecast_T" product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">OFS_PrepareRollingForecast_T</property><property name="seeded">true</property><statement kind="formula" name="" seq="1" type="component"><component id="-100" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Rev Source Flex1 = @PLANDI...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>Rev Source Flex1</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "Product")</user_inp></expression></formula><formula><destination><user_inp>Rev Source Flex2</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueSource2")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex1</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "Market")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex2</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueDriver2")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex3</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueDriver3")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex4</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueDriver4")</user_inp></expression></formula></conditionblock></formulae></component></statement><statement seq="2" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Currency eq Is Not Empty</property><property name="display_width">3</property><property name="Tile_Key">x2y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Application</user_inp></expression><expression seq="2"><user_inp>Is Simple Currency</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-102" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">strCurrencyFix = @relative...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>strCurrencyFix</user_inp></destination><expression><user_inp>@relative({Currency},0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="3" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Source Flex1 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x5y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Source Flex1</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-104" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevSrc1_Fix = ,@relative("...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevSrc1_Fix</user_inp></destination><expression><user_inp>,@relative("Product",0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="4" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Source Flex2 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x8y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Source Flex2</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-106" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevSrc2_Fix = ,@relative("...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevSrc2_Fix</user_inp></destination><expression><user_inp>,@relative("RevenueSource2",0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="5" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex1 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x11y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex1</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-108" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver1_Fix = ,@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver1_Fix</user_inp></destination><expression><user_inp>,@relative("Market",0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="6" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex2 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x14y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex2</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-110" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver2_Fix = ,@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver2_Fix</user_inp></destination><expression><user_inp>,@relative("RevenueDriver2",0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="7" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex3 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x17y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex3</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-112" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver3_Fix = ,@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver3_Fix</user_inp></destination><expression><user_inp>,@relative("RevenueDriver3",0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="8" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex4 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x20y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex4</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-114" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver4_Fix = ,@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver4_Fix</user_inp></destination><expression><user_inp>,@relative("RevenueDriver4",0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement kind="script" name="" seq="9" type="component"><component id="-115" name="" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Fix(@relative({Entity},0) [str</property><script type="calcscript"><![CDATA[set updatecalc off;
set aggmissg on;

Fix(@relative({Entity},0) [strCurrencyFix] [RevSrc1_Fix] [RevSrc2_Fix] [RevDriver1_Fix] [RevDriver2_Fix] [RevDriver3_Fix] [RevDriver4_Fix] , "OEP_Rolling Forecast")		
    Fix("OEP_Prior FCST")								
    clearblock all;							
    endfix

Fix(@relative("OFS_Financials Accounts",0))]]></script></component></statement><statement seq="10" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_width">3</property><property name="Tile_Key">x21y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>@DIMMEMBER(Period, OEP_W53)</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-117" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>WKScript</user_inp></destination><expression><user_inp>(@ismbr(@remove(@relative("OEP_Weekly Plan", 0),"OEP_W53"))) or ("TP-Weeks" == 53 and @ismbr(@relative("OEP_Weekly Plan", 0)))</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement kind="formula" name="" seq="11" type="component"><component id="-118" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Weekly = @DIMMEMBER("Perio...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>Weekly</user_inp></destination><expression><user_inp>@DIMMEMBER("Period", "OEP_Weekly Plan")</user_inp></expression></formula><formula><destination><user_inp>IsWeeklyEnabled</user_inp></destination><expression><user_inp>@COMPARE([Weekly], "OEP_Weekly Plan", "true")</user_inp></expression></formula></conditionblock></formulae></component></statement><statement seq="12" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">IF</property><property name="display_width">3</property><property name="Tile_Key">x25y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>IsWeeklyEnabled</user_inp></expression><expression seq="2"><user_inp>True</user_inp></expression></biop></expression></test><then><statement kind="script" name="" seq="1" type="component"><component id="-120" name="" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="caption">If Weekly App</property><property name="display_label">If Weekly App</property><script type="calcscript"><![CDATA[Fix(@relative("OFS_Total Plan",0),&OEP_RollingFCST,&OEP_QrtlyFCSTRF,&OEP_WeeklyRFRange)							
	Fix(@relative("OEP_Weekly Plan",0),@relative(Yeartotal,0),@relative("OEP_Qrtly Plan",0))						
		DATACOPY "OEP_Working" TO "OEP_Prior FCST";					
	endfix						
endfix							
							
Fix(OEP_Working)							
	Fix (&OEP_WeeklyRFRange, @relative("OEP_Weekly Plan", 0))						
	"OFS_Calculated" (						
		@calcmode(block);
		@calcmode(bottomup);
			if(not(@ismbr("No Year")))				
				if((@ismbr(&OEP_CurYR) and Not(@ismbr(Week1:&OEP_CurWeek))) or (@ismbr(@remove(&OEP_WeeklyRFRange, @list(&OEP_CurYr, @MEMBERAT(&OEP_WeeklyRFRange, -1)))) and @ismbr(@relative("OEP_Weekly Plan",0))) or (@ismbr(@MEMBERAT(&OEP_WeeklyRFRange, -1)) and @ismbr(&OEP_WeeklyYr2Range)))
					If ("OFS_Trend"->BegBalance <> #Missing)
						%Script(name:="Weekly_Trends")		
						%Script(name:="Weekly_ForecastOnly")		
				endif			
				endif 			
			endif				
		endif
		);					
	endfix	
	
	Fix (&OEP_RollingFCST, @relative("YearTotal", 0))						
	"OFS_Calculated" (						
		@calcmode(block);
		@calcmode(bottomup);
		
		if (Not(@ismbr("No Year")))
			if([WKScript])
			if((@ismbr(&OEP_CurYR) and @ismbr(&OEP_FcstMnth:&OEP_EndMnth)) or (@ismbr(@remove(&OEP_RollingFCST, @list(&OEP_CurYr, @MEMBERAT(&OEP_RollingFCST, -1)))) and @ismbr(@relative("YearTotal",0))) or (@ismbr(@MEMBERAT(&OEP_RollingFCST, -1)) and @ismbr(&OEP_StartMnth:&OEP_RollingFCSTEnd)))	
					%Script(name:="Monthly_Trends") 					
					%Script(name:="Forecast_Only_Trends")					
				endif
			endif				
		endif					
		endif					
	);						
	endfix
							
	Fix(&OEP_QrtlyFCSTRF,@relative("OEP_Qrtly Plan", 0))						
	"OFS_Calculated"(						
		@calcmode(block);
		@calcmode(bottomup);
		if (Not(@ismbr("No Year"))) 					
				%Script(name:="Qrtly_Trends")			
		endif					
	)						
	;						
	endfix
	
	Fix (&OEP_CurYr)
		Fix(OEP_W1:&OEP_CurWeek)
        "OFS_Calculated" (	
			@calcmode(block); 									
			@calcmode(bottomup);
        	IF(@ismbr(@memberat(&OEP_WeeklyRFRange,1)))
			"OFS_Calculated" = "OEP_Actual"->"OFS_Load";
            endif
		)					
		;					
		endfix
		
		Fix (&OEP_StartMnth:&OEP_CurMnth)					
			"OFS_Calculated" (
				@calcmode(block); 									
				@calcmode(bottomup);							
			"OFS_Calculated" = "OEP_Actual"->"OFS_Load";				
		)					
		;					
		endfix			
		
		Fix(@relative("OEP_Qrtly Plan",0))					
			OFS_Calculated(	
				@calcmode(block); 								
			   @calcmode(bottomup);	
			if(@ismbr(@memberat(&OEP_QrtlyFCSTRF,1)))							
				if(Not(@ismbr("No Year")))			
					if(@ismbr("Qtrly 1"))     		
						if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth >= 3)	
							"OFS_Calculated"=Q1->OEP_Actual->OFS_Load;
						endif	
					elseif(@ismbr("Qtrly 2"))		
						if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth>= 6)	
						"OFS_Calculated"="Q2"->OEP_Actual->OFS_Load;	
						endif	
					elseif(@ismbr("Qtrly 3"))		
						if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth >= 9)	
						"OFS_Calculated"="Q3"->OEP_Actual->OFS_Load;	
						endif	
					elseif(@ismbr("Qtrly 4"))		
						if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth==12)	
						"OFS_Calculated"="Q4"->OEP_Actual->OFS_Load;	
						endif	
					endif		
				endif			
			endif				
		)					
		;					
		endfix					
	endfix						
endfix							
endfix							
							
Fix(&OEP_WeeklyRFRange,&OEP_RollingFCST,&OEP_QrtlyFCSTRF,OEP_Working)							
	Fix(@relative("OEP_Weekly Plan",0),@relative(Yeartotal,0),@relative("OEP_Qrtly Plan",0))						
		Fix(OFS_Calculated)					
			calc dim("Account");				
		endfix					
	endfix						
endfix							
Endfix							
]]></script></component></statement></then><else><statement kind="script" name="" seq="1" type="component"><component id="-121" name="" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="caption">Regular App</property><property name="display_label">Regular App</property><script type="calcscript"><![CDATA[Fix(@relative("OFS_Total Plan",0),&OEP_RollingFCST,&OEP_QrtlyFCSTRF)								
              Fix(@relative(Yeartotal,0),@relative("OEP_Qrtly Plan",0))
                  DATACOPY "OEP_Working" TO "OEP_Prior FCST";						
              endfix						
      endfix							


Fix(OEP_Working)

Fix (&OEP_RollingFCST, @relative("YearTotal", 0))
        OFS_Calculated (
			@calcmode(block);								
	        @calcmode(bottomup);
			if((@ismbr(&OEP_CurYR) and @ismbr(&OEP_FcstMnth:&OEP_EndMnth)) or (@ismbr(@remove(&OEP_RollingFCST, @list(&OEP_CurYr, @MEMBERAT(&OEP_RollingFCST, -1)))) and @ismbr(@relative("YearTotal",0))) or (@ismbr(@MEMBERAT(&OEP_RollingFCST, -1)) and @ismbr(&OEP_StartMnth:&OEP_RollingFCSTEnd)))
				%Script(name:="Monthly_Trends") 
				%Script(name:="Forecast_Only_Trends")
			endif	
			endif
    );
endfix										

Fix(&OEP_QrtlyFCSTRF,@relative("OEP_Qrtly Plan", 0))
    OFS_Calculated(	
		@calcmode(block); 
		@calcmode(bottomup);	
	if (Not(@ismbr("No Year"))) 
        %Script(name:="Qrtly_Trends")		
    endif
    )	
    ;									
endfix
 Fix (&OEP_CurYr) 
        Fix (&OEP_StartMnth:&OEP_CurMnth) 
          OFS_Calculated (     
             	@calcmode(block); 							
				@calcmode(bottomup);
              "OFS_Calculated" = "OEP_Actual"->"OFS_Load";
            )
            ;
		endfix
        Fix(@relative("OEP_Qrtly Plan",0))
           OFS_Calculated(     
				@calcmode(block); 							
				@calcmode(bottomup);
				if(@ismbr(@memberat(&OEP_QrtlyFCSTRF,1)))
			if(@ismbr("Qtrly 1"))     
              if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth >= 3) 
               "OFS_Calculated"=Q1->OEP_Actual->OFS_Load;
              endif
            elseif(@ismbr("Qtrly 2"))
              if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth>= 6) 
              "OFS_Calculated"="Q2"->OEP_Actual->OFS_Load;
              endif
            elseif(@ismbr("Qtrly 3"))
              if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth >= 9) 
               "OFS_Calculated"="Q3"->OEP_Actual->OFS_Load;
              endif
            elseif(@ismbr("Qtrly 4"))
              if ("Fiscal TP-Index"->OFS_Load->&OEP_CurMnth==12) 
              "OFS_Calculated"="Q4"->OEP_Actual->OFS_Load;
             endif
             endif
             endif
              ) 
              ;
        endfix
        
      endfix 
endfix
endfix
									

Fix(&OEP_RollingFCST,&OEP_QrtlyFCSTRF,OEP_Working)								
  Fix(@relative(Yeartotal,0),@relative("OEP_Qrtly Plan",0))
    Fix(OFS_Calculated)
    calc dim("Account");
    endfix
  endfix
endfix


Endfix]]></script></component></statement></else></if></statement><template_wizard><wizard_step name="Inputs" seq="0"/></template_wizard><template_prompts><restricted_prompt isPrompt="no" name="Application Type" type="Application Type"><property name="is_system">true</property><restricted_prompt_item><property name="prompt">Is Generic</property><property name="value">GENERAL</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is PFP</property><property name="value">PROJECT</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is PSB</property><property name="value">PSB</property></restricted_prompt_item></restricted_prompt><restricted_prompt isPrompt="no" name="Application" type="Application"><property name="is_system">true</property><value>Is Single Currency</value><restricted_prompt_item><property name="prompt">Is Multi Currency</property><property name="value">multi</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is Single Currency</property><property name="value">single</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is Simple Currency</property><property name="value">simple</property></restricted_prompt_item></restricted_prompt><template_slice_prompt isPrompt="false" name="UpperPOV" type="Member Range"><property name="is_system">true</property></template_slice_prompt><restricted_prompt isPrompt="no" name="Essbase Mode" type="Essbase Mode"><property name="is_system">true</property><restricted_prompt_item><property name="prompt">Is Hybrid</property><property name="value">Hybrid</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is NonHybrid</property><property name="value">NonHybrid</property></restricted_prompt_item></restricted_prompt><template_prompt isPrompt="false" name="Rev Source Flex1" type="String"/><template_prompt isPrompt="false" name="Rev Source Flex2" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex1" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex2" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex3" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex4" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="RevSrc1_Fix" type="String"/><template_prompt isPrompt="false" name="RevSrc1_EndFix" type="String"/><template_prompt isPrompt="false" name="RevSrc1_Agg" type="String"/><template_prompt isPrompt="false" name="RevSrc2_Fix" type="String"/><template_prompt isPrompt="false" name="RevSrc2_EndFix" type="String"/><template_prompt isPrompt="false" name="RevSrc2_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver1_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver1_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver1_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver2_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver2_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver2_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver3_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver3_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver3_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver4_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver4_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver4_Agg" type="String"/><template_prompt isPrompt="true" name="mPeriod" type="Members"><property name="dim_type_limit">Period</property><property name="dimension_limit">both</property><property name="prompt_text">Enter Period</property></template_prompt><template_prompt isPrompt="true" name="mYear" type="Members"><property name="dim_type_limit">Year</property><property name="dimension_limit">both</property><property name="prompt_text">Enter Years</property></template_prompt><template_prompt isPrompt="true" name="mVersion" type="Member"><property name="dim_type_limit">Version</property><property name="dimension_limit">both</property><property name="prompt_text">Enter Version</property></template_prompt><template_prompt isPrompt="false" name="strEndFix" type="String"><value>EndFix</value></template_prompt><template_prompt isPrompt="false" name="dCurrency" type="Dimension"><property name="isMandatory">false</property><property name="isreadOnly">false</property><value>Currency</value><dimension name="Currency"/></template_prompt><template_prompt isPrompt="false" name="strCurrencyFix" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Weekly" type="String"/><template_prompt isPrompt="false" name="IsWeeklyEnabled" type="Boolean"/><template_prompt isPrompt="false" name="WKScript" type="String"><value>@ismbr(@relative("OEP_Weekly Plan", 0))</value></template_prompt></template_prompts></template></templates></HBRRepo>